import service from '../utils/request'

//一个请求封装一个函数
export function user_login( payload = {} ){
    return service.post('/api/user/login', payload );
}
export function user_register( payload = {} ){
    return service.post('/api/user/register', payload );
}
export function role_list( payload = {} ){
    return service.get('/api/role/list', { params: payload } );
}
export function business_list( payload = {} ){
    return service.get('/api/business/list', { params: payload } );
}
export function business_add( payload = {} ){
    return service.post('/api/business/add',  payload );
}
export function business_delete( payload = {} ){
    return service.post('/api/business/delete',  payload );
}

// 外勤打卡
export function outside_list( payload = {} ){
    return service.get('/api/outside/list', { params: payload } );
}
export function outside_add( payload = {} ){
    return service.post('/api/outside/add',  payload );
}
export function outside_delete( payload = {} ){
    return service.post('/api/outside/delete',  payload );
}
export function outside_import( payload = {} ){
    return service.post('/api/outside/import',  payload );
}
export function outside_download( payload = {} ){
    return service.get('/api/outside/download', { params: payload } );
}
// 请假申请
export function leave_list( payload = {} ){
    return service.get('/api/leave/list', { params: payload } );
}
export function leave_add( payload = {} ){
    return service.post('/api/leave/add',  payload );
}
export function leave_delete( payload = {} ){
    return service.post('/api/leave/delete',  payload );
}
export function leave_import( payload = {} ){
    return service.post('/api/leave/import',  payload );
}
export function leave_download( payload = {} ){
    return service.get('/api/leave/download', { params: payload } );
}
// 加班申请
export function work_list( payload = {} ){
    return service.get('/api/work/list', { params: payload } );
}
export function work_add( payload = {} ){
    return service.post('/api/work/add',  payload );
}
export function work_delete( payload = {} ){
    return service.post('/api/work/delete',  payload );
}
export function work_import( payload = {} ){
    return service.post('/api/work/import',  payload );
}
export function work_download( payload = {} ){
    return service.get('/api/work/download', { params: payload } );
}




//...